<template>
<div class="table">
    <div ref="chartDom" style="width: 100%;height:50vh;"></div>
    <div class="submitted">
        <n-input-number
            v-model:value="new_score"
        />
        <n-button @click="emit('setScore',new_score)">修改分数</n-button>
    </div>
</div>

</template>

<script setup>
import * as echarts from 'echarts';
const emit = defineEmits(["setScore"])
const props = defineProps(["data","taskInfo"])
const chartDom = ref(null)
// 单页数据量
const pagination = {
    pageSize: 10
}
// 修改分数

const new_score = ref(null)
const drawing = ()=>{
    let myChart = echarts.init(chartDom.value);
    props.data.option && myChart.setOption(props.data.option);
}
defineExpose({drawing})
</script>

<style scoped lang="less">
.table{
    display: flex;
    flex-direction: column;
    padding: 0 20px 0 0;
    .n-data-table {
        flex: 60;
    }
    .submitted{
        flex: 40;
        display: flex;
        margin-top: 30px;
        justify-content: flex-end
    }
}
</style>